<link href="__PUBLIC__/plugins/fitui/tablegrid.css" rel="stylesheet">
<link href="__PUBLIC__/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet">
<script src="__PUBLIC__/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="__PUBLIC__/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="__PUBLIC__/js/mp/format.js"></script>
<script src="__PUBLIC__/plugins/fitui/tablegrid.js"></script>
<script src="__PUBLIC__/js/mp/mer_user_promote_stat.js"></script>
<script>
var Param = <?php echo json_encode( $param ) ?> ;
$(function(){
  MerUserPromoteStat.init(<?php echo json_encode( $config ) ?>);
});

</script>

<div class="page-content">
  <ol class="breadcrumb">
    <li><a href="<?php echo $home_url ?>">首页</a></li>
    <li class="active"><?php echo $module_name ?></li>
  </ol>
  <div class="page-content-inner"> 
    <!-- read_modal -->
    <div class="portlet blue" id="read_modal"> 
      <!-- portlet-title -->
      <div class="portlet-title">
        <div class="caption"> <i class="fa fa-comments "></i> <?php echo $module_name ?> </div>
        <div class="tools">
          <?php if ( $opt_data == 1 || in_array( '添加' , $opt_data ) ) : ?>
          <!-- <a href="#" class="toolbtn add load_add_modal_btn" data-toggle="tooltip" data-placement="top" title="新增"></a> -->
          <?php endif ; ?>
        </div>
      </div>
      <!-- end portlet-title -->
      <div class="portlet-body "> 
        <form id="search_form" class="form-inline" style="margin-bottom:16px;">
          <div class="form-group">
            <label for="start_time">起始日期</label>
            <input type="text" class="form-control dtp" id="start_time" placeholder="起始日期">
          </div>
          <div class="form-group">
            <label for="end_time">结束日期</label>
            <input type="text" class="form-control dtp" id="end_time" placeholder="结束日期">
          </div>
          <button type="submit" class="btn btn-primary" id="search_btn"><i class="fa fa-search"></i> 查询</button>
          <button type="submit" class="btn btn-info" id="count_btn"><i class="fa fa-bar-chart"></i> 统计</button>
        </form>

        <!-- table grid -->
        <div class="table-responsive">
          <table id="data_table" class="table table-striped table-hover table-condensed">
            <thead>
              <tr>
                <th width="60" data-field="id">ID</th>
                <th width="100" data-field="date">日期</th>
                <th width="80" data-field="sub_num">推广人数</th>
                <?php if ( $opt_data == 1 || in_array( '编辑' , $opt_data ) ) : ?>
                <!-- <th width="80" data-formatter="opt_edit"></th> -->
                <?php endif ; ?>
                <?php if ( $opt_data == 1 || in_array( '删除' , $opt_data ) ) : ?>
                <!-- <th width="80" data-formatter="opt_delete"></th> -->
                <?php endif ; ?>
                <th>&nbsp;</th>
              </tr>
            </thead>
          </table>
        </div>
        <!-- end table --> 
      </div>
    </div>
    <!-- end portlet read_modal --> 
  </div>
  <!-- end page-content-inner --> 
</div>

<!-- add_edit_model -->
<div class="modal fade" id="add_edit_modal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="action_label"></h4>
      </div>
      <div class="modal-body">
        <form id="submit_form" class="form-horizontal">
          <div class="form-group">
            <label class="col-sm-3 control-label"></label>
            <div class="col-sm-7">
              <input name="id" placeholder="" data-valid="required" data-tips="请填写正确的" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">统计时间</label>
            <div class="col-sm-7">
              <input name="date" placeholder="统计时间" data-valid="required" data-tips="请填写正确的统计时间" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">用户ID</label>
            <div class="col-sm-7">
              <input name="user_id" placeholder="用户ID" data-valid="required" data-tips="请填写正确的用户ID" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">关注人数</label>
            <div class="col-sm-7">
              <input name="sub_num" placeholder="关注人数" data-valid="required" data-tips="请填写正确的关注人数" type="text" class="form-control" >
            </div>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-times"></i> 关闭</button>
        <button type="button" class="btn btn-primary" id="submit_btn"><i class="fa fa-check"></i> 提交</button>
      </div>
    </div>
    <!-- /.modal-content --> 
  </div>
  <!-- /.modal-dialog --> 
</div>
<!-- /#add_edit_model --> 

